#!/bin/sh
exec 2>&1
TARGET=${1}
SVNAME=${2}

start() {
    # exec /usr/bin/tail -f /dev/null
    exec /usr/sbin/xrdp -nodaemon
}

reset() {
    case $3 in
      'exit' )
        echo "*** [${SVNAME}] exited status $4" ;;
      'signal' )
        echo "*** [${SVNAME}] killed on signal $5" ;;
      * )
        echo "*** [${SVNAME}] stopped ($3)" ;;
    esac
    exit 0
}

eval ${TARGET} "$@"
